import http from '@/utils/http'

enum Api{
    // 权益管理-立减金权益操作-API
    equitySaveOrUpdate="/api/equity/instantReductionVoucher/saveOrUpdate", // 新增或则修改
    equityPage="/api/equity/instantReductionVoucher/page", // 分页列表
    equityList="/api/equity/instantReductionVoucher/list", // 列表
    equityIncrementQuota="/api/equity/instantReductionVoucher/updateQuota", // 新增配额
    equityDetail="/api/equity/instantReductionVoucher/detail", // 详情
    equityDelete="/api/equity/instantReductionVoucher/delete", // 删除
    equityListDataById="/api/equity/instantReductionVoucher/inventoryListDataById", // 根据id查询库存数据


    schemeSaveOrUpdate="/api/equityScheme/saveOrUpdate",
    schemePage="/api/equityScheme/page",
    schemeList="/api/equityScheme/list",
    schemeDetail="/api/equityScheme/detail",
    schemeDelete="/api/equityScheme/delete",


    // 权益包配置
    equityPackageAdd = '/api/EquityPackage/saveOrUpdate',
    equityPackagePage = '/api/EquityPackage/page',
    equityPackageList = '/api/EquityPackage/listByQueryDTO',
    equityPackageDetail = '/api/EquityPackage/detail',
    equityPackageDelete = '/api/EquityPackage/delete',


    // 联合会员订单权益明细操作-API
    orderEquityPackageDetailPage = '/api/associateMember/orderEquityDetail/page',
    orderEquityPackageDetailList = '/api/associateMember/orderEquityDetail/list',
    orderEquityPackageDetailDetail = '/api/associateMember/orderEquityDetail/detail',

    // 权益组合配置
    EquityPortfolioSave='/api/EquityPortfolio/saveOrUpdate',
    EquityPortfolioPage='/api/EquityPortfolio/page',
    EquityPortfolioList='/api/EquityPortfolio/listByQueryDTO',
    EquityPortfolioDetail='/api/EquityPortfolio/detail',
    EquityPortfolioDelete='/api/EquityPortfolio/delete',
    // 权益券配置-API
    voucherSaveOrUpdateSave='/api/equity/voucher/saveOrUpdate',
    voucherSaveOrUpdatePage='/api/equity/voucher/page',
    voucherSaveOrUpdateList='/api/equity/voucher/list',
    voucherSaveOrUpdateDetail='/api/equity/voucher/detail',
    voucherSaveOrUpdateDelete='/api/equity/voucher/delete',

}
export const voucherSaveOrUpdateDetailGet = async (params: any) => {
    return http.getRestApi(Api.voucherSaveOrUpdateDetail, params)
}
export const voucherSaveOrUpdateDeleteDel = async (params: any) => {
    return http.delete(Api.voucherSaveOrUpdateDelete, params)
}
export const voucherSaveOrUpdateSavePost = async (params: any) => {
    return http.post(Api.voucherSaveOrUpdateSave, params)
}
export const voucherSaveOrUpdatePagePost = async (params: any) => {
    return http.post(Api.voucherSaveOrUpdatePage, params)
}
export const voucherSaveOrUpdateListPost = async (params: any) => {
    return http.post(Api.voucherSaveOrUpdateList, params)
}
export const EquityPortfolioListGet = async (params: any) => {
    return http.post(Api.EquityPortfolioList, params)
}
export const EquityPortfolioDetailGet = async (params: any) => {
    return http.getRestApi(Api.EquityPortfolioDetail, params)
}
export const EquityPortfolioSavePost = async (params: any) => {
    return http.post(Api.EquityPortfolioSave, params)
}
export const EquityPortfolioPagePost = async (params: any) => {
    return http.post(Api.EquityPortfolioPage, params)
}
export const EquityPortfolioDeleteDel = async (params: any) => {
    return http.delete(Api.EquityPortfolioDelete, params)
}






export const orderEquityPackageDetailPagePost = async (params: any) => {
    return http.post(Api.orderEquityPackageDetailPage, params)
}
export const orderEquityPackageDetailListPost = async (params: any) => {
    return http.post(Api.orderEquityPackageDetailList, params)
}
export const orderEquityPackageDetailDetailDel = async (params: any) => {
    return http.delete(Api.orderEquityPackageDetailDetail, params)
}
export const equityPackageAddPost = async (params: any) => {
    return http.post(Api.equityPackageAdd, params)
}
export const equityPackagePagePost = async (params: any) => {
    return http.post(Api.equityPackagePage, params)
}
export const equityPackageListGet = async (params: any) => {
    return http.post(Api.equityPackageList, params)
}
export const equityPackageDetailGet = async (params: any) => {
    return http.getRestApi(Api.equityPackageDetail, params)
}
export const equityPackageDeleteDel = async (params: any) => {
    return http.delete(Api.equityPackageDelete, params)
}
export const schemeDeleteDel = async (params: any) => {
    return http.delete(Api.schemeDelete, params)
}
export const equityListDataByIdGet = async (params: any) => {
    return http.getRestApi(Api.equityListDataById, params)
}
export const schemeDetailGet = async (params: any) => {
    return http.getRestApi(Api.schemeDetail, params)
}
export const schemePageGet = async (params: any) => {
    return http.post(Api.schemePage, params)
}
export const schemeListPost = async (params: any) => {
    return http.post(Api.schemeList, params)
}
export const schemeSaveOrUpdatePost = async (params: any) => {
    return http.post(Api.schemeSaveOrUpdate, params)
}
export const equitySaveOrUpdatePost = async (params: any) => {
    return http.post(Api.equitySaveOrUpdate, params)
}
export const equityPagePost = async (params: any) => {
    return http.post(Api.equityPage, params)
}
export const equityListPost = async (params: any) => {
    return http.post(Api.equityList, params)
}
export const equityIncrementQuotaPost = async (params: any) => {
    return http.post(Api.equityIncrementQuota, params)
}

export const equityDetailGet = async (params: any) => {
    return http.getRestApi(Api.equityDetail, params)
}
export const equityDeleteDelete = async (params: any) => {
    return http.delete(Api.equityDelete, params)
}